<template>
	<view class="message">
		<view class="logo">
			<image src="../../../static/icon/success.png" mode="widthFix"></image>
		</view>
		<view class="status-text text-highlight">等待审核</view>
		<view class="row">
			<view class="label">转出账户</view>
			<view class="value">{{pagedata.from}}</view>
		</view>
		<view class="row">
			<view class="label">转入账户</view>
			<view class="value">{{pagedata.to}}</view>
		</view>
		<view class="row">
			<view class="label">交易类型</view>
			<view class="value">{{pagedata.type}}</view>
		</view>
		<!-- <view class="row">
			<view class="label">订单ID</view>
			<view class="value">{{pagedata.id}}</view>
		</view> -->
		<view class="row">
			<view class="label">交易时间</view>
			<view class="value">{{pagedata.create_time}}</view>
		</view>
		<!-- <view class="button-box-padding">
			<button class="btn-outline btn-block" @click="transcan()">去TRONSCAN查看</button>
		</view> -->
		<view class="button-box-padding" style="padding-top:0;margin-top:0;">
			<button class="btn-primary btn-block" @click="relaunch()">返回首页</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pagedata: null,
			}
		},
		onLoad(e) {
			this.pagedata = JSON.parse(e.data)
			console.log(this.pagedata)
		},
		methods: {
			transcan() {
				let url = "https://tronscan.io/#/transaction/" + this.pagedata.txid;
				plus.runtime.openURL(url, function(res) {
					console.log(res);
				});
			},
			relaunch(){
				uni.reLaunch({
					url:"../index"
				})
			}
		}
	}
</script>

<style lang="scss">
	view {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
	}

	.message {
		.logo {
			image {
				width: 100px;
				height: 100px;
				margin: 0 auto;
			}
		}
		.status-text{
			font-size: 24px;
			font-weight: bold;
			margin-bottom:15px;
			text-align: center;
		}

		padding:30px 0;

		.row {
			padding: 7.5px 15px;

			.label {
				opacity: .5;
			}

			.value {
				word-break: break-word;
				line-height: 110%;
				font-weight: bold;
			}
		}
	}
</style>
